    function changeRegions(obj) {
        
        new Ajax.Request(ADMIN_URL + 'restaurant/ajax_prefs_by_region_id', {
            method:'get',
            parameters: {region_id: obj.options[obj.selectedIndex].value},
            onSuccess: function(transport) {

                select_options(transport, 'pref_id');
            },
            onFailure: function() { alert('Something went wrong...'); }
        });
    }

    function changePrefs(obj) {
    	new Ajax.Request(ADMIN_URL + 'restaurant/ajax_prefs_by_pref_id', {
            method:'get',
            parameters: {pref_id: obj.options[obj.selectedIndex].value},
            onSuccess: function(transport) {
                select_options(transport, 'city_id');
            },
            onFailure: function() { alert('Something went wrong...'); }
        });
    }

    function select_options (json, id_selectbox) {
        $(id_selectbox).options.length = 0;
        var opt = document.createElement('option');
        opt.text = 'Vui lòng chọn';
        $(id_selectbox).options.add(opt);

        var response = json.responseText || "no response text";
        if(eval(response)) {
            var my_options = $A(eval(response));
            $A(my_options).each(function(s, index) {
              var tmp = $A(s);
              var opt = document.createElement('option');
               opt.text = tmp[1];
               opt.value = tmp[0];
               $(id_selectbox).options.add(opt);
            });
        }
    }